<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }

        img{
            vertical-align: top;
        }

        #box{
            position: fixed;
            right: 0;
            bottom: 0;
        }

        #close{
            width: 25px;
            height: 25px;
            /*background-color: red;*/
            position: absolute;
            right: 0;
            top: 0;
        }
    </style>
</head>
<body>
    <div id="box">
        <span id="close"></span>
        <div id="top">
            <img src="images/top.jpg" alt="">
        </div>
        <div id="bottom">
            <img src="images/bottom.jpg" alt="">
        </div>
    </div>
<script src="js/myFunc.js"></script>
<script>
    window.onload = function () {
        // 1. 获取需要的标签
        var box = $("box");
        var bottom = $("bottom");
        var top = $("top");
        var close = $("close");

        // 2. 监听点击
        close.onclick = function () {
            buffer(bottom, {height: 0}, function () {
                buffer(box, {width: 0}, function () {
                    close.style.display = "none";
                });
            });
        }
    }
</script>
</body>
</html>